1. Field of the Invention
The invention relates generally to a method and system of improving silhouette appearance, applied to a bump mapping technique, thereby rendering a three-dimensional and true object silhouette.
2. Description of the Related Art
Bump mapping roughens surfaces of a object by modifying the normals without displacing surfaces. Although there seems to be many bumps in the surfaces, it is no more than a camouflage.
As shown in FIG. 1(a), there are parallel, upward normals on a smooth surface. In contrast, a rough surface features disorderly directions of surface normals in FIG. 1(b). After bump mapping is applied, a smooth surface whose normal directions should be parallel mimics a rough surface with disorderly surface normals as shown in FIG. 1(c).
In contrast with bump mapping modifying surface normals only, displacement mapping actually varies surfaces; for example, a screw is created from a cylinder.
However, the main problem of bump mapping is that real concaves or convexes does not exist in a model. Thus, silhouette edges that seem to pass through a concave does not produce an expected cross section. In other words, silhouette edges still comply with the original geometry of the module. Silhouette appearance seems like flat, even if the bump mapping technique has been applied to emulate a rugged surface.
In view of the above-mentioned problems, it is therefore an important object of the invention to provide a method and system of improving silhouette appearance in bump mapping so that the appearance of the bumpy object silhouette approaches the true geometry.
A method of improving silhouette appearance in bump mapping comprises the following steps: receiving, checking vertex, checking subdivision, subdividing, repeating, displacing and bump mapping. In the receiving step, a triangle of a plurality of triangles is received. In the checking vertex step, whether there is a vertex near silhouette in the triangle is checked. In the checking subdivision step whether the triangle meets a predetermined criterion of subdivision is checked, if the result of the checking vertex step is xe2x80x9cYESxe2x80x9d. In the subdividing step, the triangle is subdivided if the result of the checking subdivision step is xe2x80x9cYESxe2x80x9d. In the repeating step, the receiving step the checking vertex step, the checking subdivision step and the subdividing step are repeated until the triangle does not meet the predetermined criterion. In the displacing step, the vertex positions near silhouette along their normals are displaced according to the displacements obtained from displacement mapping if the result of the checking subdivision step is xe2x80x9cNOxe2x80x9d. Finally, in a bump mapping step, the bump mapping technique is implemented if the result of the checking vertex step is xe2x80x9cNOxe2x80x9d.
A system of improving silhouette appearance in bump mapping comprises the following devices. A receiving device receives a triangle of a plurality of triangles. A checking vertex device checks whether there is a vertex near silhouette in the triangle. A checking subdivision device checks whether the triangle meets a predetermined criterion of subdivision if there is a vertex near silhouette in the triangle. A subdividing device subdivides the triangle. A repeating device conducts the receiving device, the checking vertex device, the checking subdivision device and the subdividing device to repeat their own operations until the triangle does not meet the predetermined criterion, and then inputs the triangle into the displacing device. A displacing device of displacing the vertex positions near silhouette along their normals according to the displacements obtained from displacement mapping. And a bump mapping device implements bump mapping if there is no vertex near silhouette in the triangle or after the triangle has been processed by the displacing device.
In addition, there is provided a machine-readable record medium storing programs for instructing an MPU (Microprocessor Unit) etc. to execute the aforementioned method of improving silhouette appearance in bump mapping.
Furthermore, there is provided a system of improving silhouette appearance in bump mapping, comprising a CPU and a memory storing instructions so that the CPU can access instructions stored in the memory and execute the aforementioned method of improving silhouette appearance in bump mapping.
Both bump mapping and displacement mapping can mimic a rugged surface. However, if the surface is not perpendicular to the line of sight, bump mapping has fine visual quality and less mathematic operations, but can not display the closely true geometry of bumps near silhouette. Although the visual quality is quite satisfactory, displacement mapping is limited to use considerable quantity of triangles to mimic the true geometry after the base model has been moved. Thus, in order to combine the advantages of bump mapping and displacement mapping, the invention disclose a method and system: Apply bump mapping to a triangle (surface) near silhouette, or apply displacement mapping to a triangle (surface) not near silhouette. Therefore, the invention not only reduces the operation overhead of applying bump mapping to a whole model, but also retains the true geometry in displaying object silhouette.